/*
 *ajax 上传附件
 */
function uploadFile(attachment_id) {
    var _file = this;
    var data = new FormData();
    data.append('attachment', _file.files[0]);

    URL_fileShareUpload = "{{ path('api_public_upload_attachment') }}";
    $.ajax({
        url:URL_fileShareUpload,
        type: 'POST',
        dataType: 'json',
        processData: false,
        contentType: false,
        data: data,
        success: function (data) {
            if(data.errorCode == 0){

                attachment_id = data.data.attachment_id;
                popStatus(1, '上传成功', 1,'', true);
            } else {
                alert(data.message);
                return false;
            }
        }
    });
}